package com.ruoyi.yanjing.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.yanjing.mapper.SpecialEquipmentCheckMapper;
import com.ruoyi.yanjing.domain.SpecialEquipmentCheck;
import com.ruoyi.yanjing.service.ISpecialEquipmentCheckService;

/**
 * 特种设备点检信息Service业务层处理
 * 
 * @author whz
 * @date 2024-12-04
 */
@Service
public class SpecialEquipmentCheckServiceImpl implements ISpecialEquipmentCheckService 
{
    @Autowired
    private SpecialEquipmentCheckMapper specialEquipmentCheckMapper;

    /**
     * 查询特种设备点检信息
     * 
     * @param id 特种设备点检信息主键
     * @return 特种设备点检信息
     */
    @Override
    public SpecialEquipmentCheck selectSpecialEquipmentCheckById(Long id)
    {
        return specialEquipmentCheckMapper.selectSpecialEquipmentCheckById(id);
    }

    /**
     * 查询特种设备点检信息列表
     * 
     * @param specialEquipmentCheck 特种设备点检信息
     * @return 特种设备点检信息
     */
    @Override
    public List<SpecialEquipmentCheck> selectSpecialEquipmentCheckList(SpecialEquipmentCheck specialEquipmentCheck)
    {
        return specialEquipmentCheckMapper.selectSpecialEquipmentCheckList(specialEquipmentCheck);
    }

    /**
     * 新增特种设备点检信息
     * 
     * @param specialEquipmentCheck 特种设备点检信息
     * @return 结果
     */
    @Override
    public int insertSpecialEquipmentCheck(SpecialEquipmentCheck specialEquipmentCheck)
    {
        specialEquipmentCheck.setCreateTime(DateUtils.getNowDate());
        return specialEquipmentCheckMapper.insertSpecialEquipmentCheck(specialEquipmentCheck);
    }

    /**
     * 修改特种设备点检信息
     * 
     * @param specialEquipmentCheck 特种设备点检信息
     * @return 结果
     */
    @Override
    public int updateSpecialEquipmentCheck(SpecialEquipmentCheck specialEquipmentCheck)
    {
        specialEquipmentCheck.setUpdateTime(DateUtils.getNowDate());
        return specialEquipmentCheckMapper.updateSpecialEquipmentCheck(specialEquipmentCheck);
    }

    /**
     * 批量删除特种设备点检信息
     * 
     * @param ids 需要删除的特种设备点检信息主键
     * @return 结果
     */
    @Override
    public int deleteSpecialEquipmentCheckByIds(Long[] ids)
    {
        return specialEquipmentCheckMapper.deleteSpecialEquipmentCheckByIds(ids);
    }

    /**
     * 删除特种设备点检信息信息
     * 
     * @param id 特种设备点检信息主键
     * @return 结果
     */
    @Override
    public int deleteSpecialEquipmentCheckById(Long id)
    {
        return specialEquipmentCheckMapper.deleteSpecialEquipmentCheckById(id);
    }
}
